Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Web API platform handlers #403

Merged
merged 2 commits into from
Feb 6, 2025
Merged

Conversation

witoszekdev
Copy link
Member

@witoszekdev witoszekdev commented Feb 5, 2025

This PR adds handlers for Web API - Request and Response objects, used for example in Next.js Edge Runtime, hono, etc.

It also refactors comments for existing handlers and improves shared types.

@witoszekdev witoszekdev requested a review from a team as a code owner February 5, 2025 15:59
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 96.17834% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.06%. Comparing base (51caa77) to head (6f4bd16).

Files with missing lines Patch % Lines
src/handlers/platforms/fetch-api/index.ts 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #403      +/-   ##
==========================================
+ Coverage   81.16%   82.06%   +0.90%     
==========================================
  Files          78       86       +8     
  Lines        3143     3284     +141     
  Branches      513      549      +36     
==========================================
+ Hits         2551     2695     +144     
+ Misses        587      583       -4     
- Partials        5        6       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

changeset-bot bot commented Feb 5, 2025

🦋 Changeset detected

Latest commit: 6f4bd16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@saleor/app-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@witoszekdev witoszekdev marked this pull request as draft February 5, 2025 16:03
@witoszekdev witoszekdev force-pushed the add-web-api-platform-handlers branch from 6e4f56d to 7a89401 Compare February 5, 2025 16:04
@witoszekdev witoszekdev marked this pull request as ready for review February 5, 2025 16:05
Add exports

Update JSDocs

Add tests for register handler

Remove `saleorDomain` from type

Rename aws-lambda file

Throw errors in adapters, instead of resolving to null

Add AWS lambda tests

Fix lambda types

Fix lambda headers

Add lambda manifest test, fix headers resolution

Fetch API: add tests for protected handler, fix types

Add tests for lambda protected handler, fix types

Simplify Fetch API adapter logic, add tests for adapter

Add lambda tests

Refactor sync webhook names, refactor types

Add web api sync webhook tests

Add async webhook tests

Add lambda sync webhook test

Fix types

Remove aws-lambda handlers (separate PR)

Remove lambda

Removed unused functions
@witoszekdev witoszekdev force-pushed the add-web-api-platform-handlers branch from 7a89401 to f563f7a Compare February 5, 2025 16:06
@witoszekdev witoszekdev merged commit 4fa8271 into main Feb 6, 2025
9 checks passed
@witoszekdev witoszekdev deleted the add-web-api-platform-handlers branch February 6, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants